#pragma once
#ifndef SMPPBIND_HPP
#define SMPPBIND_HPP

#include "SMPPHeader.hpp"

using namespace smpp::constants::InterfaceVersion;

namespace smpp {
namespace pdu{

class SMPP_DLLPRFX Bind : public Header{
	CoctetString _SystemId;
	CoctetString _Password;
	CoctetString _SystemType;
	quint8 _InterfaceVersion;
	quint8 _AddrTON;
	quint8 _AddrNPI;
	CoctetString _AddressRange;
public:
	Bind(const Header &nHeader = Header(),
		const CoctetString &nSystemId = "",
		const CoctetString &nPassword = "",
		const CoctetString &nSystemType = "",
		const quint8 nInterfaceVersion = SMPP_VER_5_0,
		const quint8 nAddrTON = 0,
		const quint8 nAddrNPI = 0,
		const CoctetString &nAddressRange = "");

	Bind(const Bind &);

	bool operator ==(const Bind &) const;

	bool operator !=(const Bind &) const;

	Bind &operator =(const Bind &);

	void setSystemId(const CoctetString &);

	const CoctetString &getSystemId() const;

	void setPassword(const CoctetString &);

	const CoctetString &getPassword() const;

	void setSystemType(const CoctetString &);

	const CoctetString &getSystemType() const;

	void setInterfaceVersion(const quint8);

	const quint8 getInterfaceVersion() const;

	void setAddrTON(const quint8);

	const quint8 getAddrTON() const;

	void setAddrNPI(const quint8);

	const quint8 getAddrNPI() const;

	void setAddressRange(const CoctetString&);

	const CoctetString& getAddressRange() const;

	void calcCommandLength();
};

}
}

#endif
